using System;
using System.ComponentModel;
using System.Drawing;
using System.Threading;
using System.Windows.Forms;
using CristiPotlog.Controls;
using ICP_MS.Plugin.Tune.Properties;

namespace ICP_MS.Plugin.Tune;

public class FormInstrumentDeadTime : Form
{
	public DeadTimeExperiment experiment = new DeadTimeExperiment();

	private bool pauseUptake = false;

	private Thread threadUptake = null;

	private IContainer components = null;

	private Wizard wizard1;

	private WizardPage wizardPageScan;

	private WizardPage wizardPageElements;

	private WizardPage wizardPageWelcome;

	private WizardPage wizardPageLowConPrepare;

	private WizardPage wizardPageEnterSampler1;

	private WizardPage wizardPageHighConPrepare;

	private WizardPage wizardPageEnterSampler2;

	private WizardPage wizardPageResultCal;

	private ComboBox comboRatios;

	private Label label4;

	private TextBox textBox3;

	private TextBox textBox2;

	private Label label5;

	private Label label3;

	private Label lblSolution;

	private Label label6;

	private Label label7;

	private Button btnContinue;

	private Button btnPause;

	private Label lblUptake;

	private ProgressBar barUptake;

	private Label label8;

	private WizardPage wizardPageScan1;

	private Label label9;

	private Label label10;

	private Label label11;

	private Button btnContinue1;

	private Button btnPause1;

	private Label lblUptake1;

	private ProgressBar barUptake1;

	private Label label13;

	private WizardPage wizardPageScan2;

	private TextBox textBox1;

	private Label label2;

	private Label label1;

	private WizardPage wizardPageFinish;

	private Label label12;

	private Label label14;

	private ListBox listBox2;

	private ListBox listBox1;

	public FormInstrumentDeadTime()
	{
		InitializeComponent();
	}

	private void SetupRatios()
	{
		comboRatios.Items.Clear();
		foreach (IsotopeRatio rat in experiment.Ratios)
		{
			comboRatios.Items.Add(rat.Name);
		}
	}

	private void FormInstrumentDeadTime_Load(object sender, EventArgs e)
	{
		experiment.InitIsotopes();
		Text = Lang.Txt("ADDTune.Calibration.DeadTimeCorrection.Text");
		wizard1.CancelText = Lang.Txt("Tune.Cancel");
		wizard1.OkText = Lang.Txt("Tune.OK");
		wizard1.NextText = Lang.Txt("Tune.Next");
		wizard1.BackText = Lang.Txt("Tune.Back");
		wizardPageWelcome.Title = Lang.Txt("CheckExperiment.Text39");
		wizardPageWelcome.Description = Lang.Txt("CheckExperiment.Text40");
		wizardPageElements.Title = Lang.Txt("CheckExperiment.Text41");
		wizardPageElements.Description = Lang.Txt("CheckExperiment.Text42");
		label4.Text = Lang.Txt("CheckExperiment.Text43");
		wizardPageScan.Title = Lang.Txt("CheckExperiment.Text19");
		wizardPageScan.Description = Lang.Txt("CheckExperiment.Text20");
		label3.Text = Lang.Txt("CheckExperiment.Text21");
		label5.Text = Lang.Txt("CheckExperiment.Text22");
		wizardPageLowConPrepare.Title = Lang.Txt("CheckExperiment.Text44");
		wizardPageLowConPrepare.Description = Lang.Txt("CheckExperiment.Text45");
		label3.Text = Lang.Txt("Tune.Text24");
		label5.Text = Lang.Txt("Tune.Text25");
		wizardPageEnterSampler1.Title = Lang.Txt("CheckExperiment.Text46");
		wizardPageEnterSampler1.Description = Lang.Txt("CheckExperiment.Text47");
		label8.Text = Lang.Txt("Tune.Text27");
		btnPause.Text = Lang.Txt("Tune.Pause");
		btnContinue.Text = Lang.Txt("Tune.Continue");
		wizardPageScan1.Title = Lang.Txt("CheckExperiment.Text32");
		wizardPageScan1.Description = Lang.Txt("CheckExperiment.Text48");
		wizardPageHighConPrepare.Title = Lang.Txt("CheckExperiment.Text49");
		wizardPageHighConPrepare.Description = Lang.Txt("CheckExperiment.Text50");
		label8.Text = Lang.Txt("Tune.Text24");
		label8.Text = Lang.Txt("Tune.Text25");
		wizardPageEnterSampler2.Title = Lang.Txt("CheckExperiment.Text51");
		wizardPageEnterSampler2.Description = Lang.Txt("CheckExperiment.Text52");
		label13.Text = Lang.Txt("Tune.Text27");
		btnPause1.Text = Lang.Txt("Tune.Pause");
		btnContinue1.Text = Lang.Txt("Tune.Continue");
		wizardPageScan2.Title = Lang.Txt("CheckExperiment.Text32");
		wizardPageScan2.Description = Lang.Txt("CheckExperiment.Text48");
		wizardPageResultCal.Title = Lang.Txt("CheckExperiment.Text53");
		wizardPageResultCal.Description = Lang.Txt("CheckExperiment.Text54");
		label1.Text = Lang.Txt("Tune.Text55");
		wizardPageFinish.Title = Lang.Txt("CheckExperiment.Text35");
		wizardPageFinish.Description = Lang.Txt("CheckExperiment.Text56");
	}

	private void btnPause_Click(object sender, EventArgs e)
	{
		pauseUptake = true;
		btnContinue.Enabled = true;
		btnPause.Enabled = false;
	}

	private void btnContinue_Click(object sender, EventArgs e)
	{
		pauseUptake = false;
		btnPause.Enabled = true;
		btnContinue.Enabled = false;
	}

	private void ShowUptake()
	{
		pauseUptake = false;
		btnPause.Enabled = true;
		btnContinue.Enabled = false;
		int tickCount = 40;
		threadUptake = new Thread((ThreadStart)delegate
		{
			while (tickCount > 0)
			{
				if (!pauseUptake)
				{
					tickCount--;
				}
				Invoke((MethodInvoker)delegate
				{
					barUptake.Value = tickCount;
					lblUptake.Text = $"{tickCount} s";
				});
				Thread.Sleep(1000);
			}
			Invoke((MethodInvoker)delegate
			{
				wizard1.Next();
			});
		});
		threadUptake.Start();
	}

	private void ShowUptake1()
	{
		pauseUptake = false;
		btnPause1.Enabled = true;
		btnContinue1.Enabled = false;
		int tickCount = 40;
		threadUptake = new Thread((ThreadStart)delegate
		{
			while (tickCount > 0)
			{
				if (!pauseUptake)
				{
					tickCount--;
				}
				Invoke((MethodInvoker)delegate
				{
					barUptake1.Value = tickCount;
					lblUptake1.Text = $"{tickCount} s";
				});
				Thread.Sleep(1000);
			}
			Invoke((MethodInvoker)delegate
			{
				wizard1.Next();
			});
		});
		threadUptake.Start();
	}

	private void wizard1_BeforeSwitchPages(object sender, Wizard.BeforeSwitchPagesEventArgs e)
	{
		WizardPage newPage = wizard1.Pages[e.OldIndex];
		switch (e.OldIndex)
		{
		case 0:
			break;
		case 1:
			break;
		case 2:
			int.TryParse(textBox2.Text, out experiment.dwelltime);
			int.TryParse(textBox3.Text, out experiment.sweeps);
			break;
		case 3:
			break;
		case 4:
			if (threadUptake != null && threadUptake.IsAlive)
			{
				threadUptake.Abort();
				threadUptake = null;
			}
			break;
		case 5:
			experiment.EventTuneFinish -= experiment_EventTuneFinish;
			experiment.EventTuneMsg -= experiment_EventTuneMsg;
			break;
		case 6:
			break;
		case 7:
			if (threadUptake != null && threadUptake.IsAlive)
			{
				threadUptake.Abort();
				threadUptake = null;
			}
			break;
		case 8:
			experiment.EventTuneFinish -= experiment_EventTuneFinish;
			experiment.EventTuneMsg -= experiment_EventTuneMsg;
			break;
		case 9:
			break;
		}
	}

	private void ShowResults()
	{
		experiment.CalculateResult();
		Invoke((MethodInvoker)delegate
		{
			textBox1.Text = experiment.tao.ToString();
		});
	}

	private void experiment_EventTuneMsg(object sender, MsgEventArgs e)
	{
		if (!base.InvokeRequired)
		{
			return;
		}
		Invoke((MethodInvoker)delegate
		{
			if (experiment.order == 1)
			{
				if (e.Message.StartsWith(Lang.Txt("CheckExperiment.Text37")))
				{
					listBox1.Items.Add(e.Message);
				}
				else
				{
					label12.Text = e.Message;
				}
			}
			else if (e.Message.StartsWith(Lang.Txt("CheckExperiment.Text37")))
			{
				listBox2.Items.Add(e.Message);
			}
			else
			{
				label14.Text = e.Message;
			}
		});
	}

	private void experiment_EventTuneFinish(object sender, EventArgs e)
	{
		if (!base.InvokeRequired)
		{
			return;
		}
		Invoke((MethodInvoker)delegate
		{
			if (experiment.TuneSucceed)
			{
				Invoke((MethodInvoker)delegate
				{
					wizard1.NextEnabled = true;
				});
				wizard1.Next();
			}
			else if (MessageBox.Show(Lang.Txt("CheckExperiment.Text11"), Lang.Txt("AddFormIgnite.Warn"), MessageBoxButtons.YesNo) == DialogResult.Yes)
			{
				StartScan(experiment.order);
			}
			else
			{
				Close();
			}
		});
	}

	private void StartScan(int order)
	{
		experiment.order = order;
		experiment.StartScan();
	}

	private void ShowRatios()
	{
		SetupRatios();
		comboRatios.Text = comboRatios.Items[0].ToString();
	}

	private void wizard1_AfterSwitchPages(object sender, Wizard.AfterSwitchPagesEventArgs e)
	{
		WizardPage newPage = wizard1.Pages[e.NewIndex];
		switch (e.NewIndex)
		{
		case 0:
			break;
		case 1:
			ShowRatios();
			break;
		case 2:
			break;
		case 3:
			break;
		case 4:
			ShowUptake();
			break;
		case 5:
			experiment.EventTuneFinish += experiment_EventTuneFinish;
			experiment.EventTuneMsg += experiment_EventTuneMsg;
			StartScan(1);
			wizard1.NextEnabled = false;
			wizard1.BackEnabled = false;
			break;
		case 6:
			break;
		case 7:
			ShowUptake1();
			break;
		case 8:
			experiment.EventTuneFinish += experiment_EventTuneFinish;
			experiment.EventTuneMsg += experiment_EventTuneMsg;
			StartScan(2);
			wizard1.NextEnabled = false;
			wizard1.BackEnabled = false;
			break;
		case 9:
			ShowResults();
			wizard1.NextEnabled = true;
			break;
		}
	}

	private void btnPause1_Click(object sender, EventArgs e)
	{
		pauseUptake = true;
		btnContinue1.Enabled = true;
		btnPause1.Enabled = false;
	}

	private void btnContinue1_Click(object sender, EventArgs e)
	{
		pauseUptake = false;
		btnPause1.Enabled = true;
		btnContinue1.Enabled = false;
	}

	private void comboRatios_SelectedIndexChanged(object sender, EventArgs e)
	{
		if (comboRatios.Text != null && comboRatios.Text != "")
		{
			experiment.SelectedRatio = experiment.Ratios[comboRatios.SelectedIndex];
			experiment.SelectedIsotopes.Clear();
			experiment.SelectedIsotopes.Add(experiment.Isotopes.Find((AnalyteIsotope r) => r.symbol == experiment.SelectedRatio.NumeratorSym));
			experiment.SelectedIsotopes.Add(experiment.Isotopes.Find((AnalyteIsotope r) => r.symbol == experiment.SelectedRatio.DenominatorSym));
		}
	}

	private void wizard1_Finish(object sender, EventArgs e)
	{
		base.DialogResult = DialogResult.OK;
	}

	private void wizard1_Cancel(object sender, CancelEventArgs e)
	{
		if (experiment.isRun)
		{
			experiment.EventTuneMsg -= experiment_EventTuneMsg;
			experiment.EventTuneFinish -= experiment_EventTuneFinish;
			experiment.StopTune();
		}
	}

	protected override void Dispose(bool disposing)
	{
		if (disposing && components != null)
		{
			components.Dispose();
		}
		base.Dispose(disposing);
	}

	private void InitializeComponent()
	{
		this.wizard1 = new CristiPotlog.Controls.Wizard();
		this.wizardPageHighConPrepare = new CristiPotlog.Controls.WizardPage();
		this.label9 = new System.Windows.Forms.Label();
		this.label10 = new System.Windows.Forms.Label();
		this.label11 = new System.Windows.Forms.Label();
		this.wizardPageScan1 = new CristiPotlog.Controls.WizardPage();
		this.listBox1 = new System.Windows.Forms.ListBox();
		this.label12 = new System.Windows.Forms.Label();
		this.wizardPageEnterSampler1 = new CristiPotlog.Controls.WizardPage();
		this.btnContinue = new System.Windows.Forms.Button();
		this.btnPause = new System.Windows.Forms.Button();
		this.lblUptake = new System.Windows.Forms.Label();
		this.barUptake = new System.Windows.Forms.ProgressBar();
		this.label8 = new System.Windows.Forms.Label();
		this.wizardPageLowConPrepare = new CristiPotlog.Controls.WizardPage();
		this.lblSolution = new System.Windows.Forms.Label();
		this.label6 = new System.Windows.Forms.Label();
		this.label7 = new System.Windows.Forms.Label();
		this.wizardPageEnterSampler2 = new CristiPotlog.Controls.WizardPage();
		this.btnContinue1 = new System.Windows.Forms.Button();
		this.btnPause1 = new System.Windows.Forms.Button();
		this.lblUptake1 = new System.Windows.Forms.Label();
		this.barUptake1 = new System.Windows.Forms.ProgressBar();
		this.label13 = new System.Windows.Forms.Label();
		this.wizardPageScan2 = new CristiPotlog.Controls.WizardPage();
		this.listBox2 = new System.Windows.Forms.ListBox();
		this.label14 = new System.Windows.Forms.Label();
		this.wizardPageResultCal = new CristiPotlog.Controls.WizardPage();
		this.textBox1 = new System.Windows.Forms.TextBox();
		this.label2 = new System.Windows.Forms.Label();
		this.label1 = new System.Windows.Forms.Label();
		this.wizardPageFinish = new CristiPotlog.Controls.WizardPage();
		this.wizardPageScan = new CristiPotlog.Controls.WizardPage();
		this.textBox3 = new System.Windows.Forms.TextBox();
		this.textBox2 = new System.Windows.Forms.TextBox();
		this.label5 = new System.Windows.Forms.Label();
		this.label3 = new System.Windows.Forms.Label();
		this.wizardPageElements = new CristiPotlog.Controls.WizardPage();
		this.comboRatios = new System.Windows.Forms.ComboBox();
		this.label4 = new System.Windows.Forms.Label();
		this.wizardPageWelcome = new CristiPotlog.Controls.WizardPage();
		this.wizard1.SuspendLayout();
		this.wizardPageHighConPrepare.SuspendLayout();
		this.wizardPageScan1.SuspendLayout();
		this.wizardPageEnterSampler1.SuspendLayout();
		this.wizardPageLowConPrepare.SuspendLayout();
		this.wizardPageEnterSampler2.SuspendLayout();
		this.wizardPageScan2.SuspendLayout();
		this.wizardPageResultCal.SuspendLayout();
		this.wizardPageScan.SuspendLayout();
		this.wizardPageElements.SuspendLayout();
		base.SuspendLayout();
		this.wizard1.Controls.Add(this.wizardPageResultCal);
		this.wizard1.Controls.Add(this.wizardPageFinish);
		this.wizard1.Controls.Add(this.wizardPageScan2);
		this.wizard1.Controls.Add(this.wizardPageEnterSampler2);
		this.wizard1.Controls.Add(this.wizardPageHighConPrepare);
		this.wizard1.Controls.Add(this.wizardPageScan1);
		this.wizard1.Controls.Add(this.wizardPageEnterSampler1);
		this.wizard1.Controls.Add(this.wizardPageLowConPrepare);
		this.wizard1.Controls.Add(this.wizardPageScan);
		this.wizard1.Controls.Add(this.wizardPageElements);
		this.wizard1.Controls.Add(this.wizardPageWelcome);
		this.wizard1.Location = new System.Drawing.Point(0, 0);
		this.wizard1.Name = "wizard1";
		this.wizard1.Pages.AddRange(new CristiPotlog.Controls.WizardPage[11]
		{
			this.wizardPageWelcome, this.wizardPageElements, this.wizardPageScan, this.wizardPageLowConPrepare, this.wizardPageEnterSampler1, this.wizardPageScan1, this.wizardPageHighConPrepare, this.wizardPageEnterSampler2, this.wizardPageScan2, this.wizardPageResultCal,
			this.wizardPageFinish
		});
		this.wizard1.Size = new System.Drawing.Size(939, 485);
		this.wizard1.TabIndex = 5;
		this.wizard1.WelcomeImage = ICP_MS.Plugin.Tune.Properties.Resources.wizardWelcom;
		this.wizard1.BeforeSwitchPages += new CristiPotlog.Controls.Wizard.BeforeSwitchPagesEventHandler(wizard1_BeforeSwitchPages);
		this.wizard1.AfterSwitchPages += new CristiPotlog.Controls.Wizard.AfterSwitchPagesEventHandler(wizard1_AfterSwitchPages);
		this.wizard1.Cancel += new System.ComponentModel.CancelEventHandler(wizard1_Cancel);
		this.wizard1.Finish += new System.EventHandler(wizard1_Finish);
		this.wizardPageHighConPrepare.Controls.Add(this.label9);
		this.wizardPageHighConPrepare.Controls.Add(this.label10);
		this.wizardPageHighConPrepare.Controls.Add(this.label11);
		this.wizardPageHighConPrepare.Description = "选择积分强度为4M<待测元素<12M cps";
		this.wizardPageHighConPrepare.Location = new System.Drawing.Point(0, 0);
		this.wizardPageHighConPrepare.Name = "wizardPageHighConPrepare";
		this.wizardPageHighConPrepare.Size = new System.Drawing.Size(939, 437);
		this.wizardPageHighConPrepare.TabIndex = 14;
		this.wizardPageHighConPrepare.Title = "高浓度测试";
		this.label9.AutoSize = true;
		this.label9.Location = new System.Drawing.Point(115, 210);
		this.label9.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label9.Name = "label9";
		this.label9.Size = new System.Drawing.Size(0, 15);
		this.label9.TabIndex = 8;
		this.label10.AutoSize = true;
		this.label10.Location = new System.Drawing.Point(61, 175);
		this.label10.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label10.Name = "label10";
		this.label10.Size = new System.Drawing.Size(82, 15);
		this.label10.TabIndex = 7;
		this.label10.Text = "溶液要求：";
		this.label11.AutoSize = true;
		this.label11.Location = new System.Drawing.Point(61, 123);
		this.label11.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label11.Name = "label11";
		this.label11.Size = new System.Drawing.Size(308, 15);
		this.label11.TabIndex = 6;
		this.label11.Text = "将进样管放入溶液后，点击 下一步 提升溶液";
		this.wizardPageScan1.Controls.Add(this.listBox1);
		this.wizardPageScan1.Controls.Add(this.label12);
		this.wizardPageScan1.Description = "死时间校正正在运行";
		this.wizardPageScan1.Location = new System.Drawing.Point(0, 0);
		this.wizardPageScan1.Name = "wizardPageScan1";
		this.wizardPageScan1.Size = new System.Drawing.Size(939, 437);
		this.wizardPageScan1.TabIndex = 18;
		this.wizardPageScan1.Title = "开始扫描";
		this.listBox1.FormattingEnabled = true;
		this.listBox1.ItemHeight = 15;
		this.listBox1.Location = new System.Drawing.Point(113, 159);
		this.listBox1.Name = "listBox1";
		this.listBox1.Size = new System.Drawing.Size(699, 244);
		this.listBox1.TabIndex = 1;
		this.label12.AutoSize = true;
		this.label12.Location = new System.Drawing.Point(110, 107);
		this.label12.Name = "label12";
		this.label12.Size = new System.Drawing.Size(0, 15);
		this.label12.TabIndex = 0;
		this.wizardPageEnterSampler1.Controls.Add(this.btnContinue);
		this.wizardPageEnterSampler1.Controls.Add(this.btnPause);
		this.wizardPageEnterSampler1.Controls.Add(this.lblUptake);
		this.wizardPageEnterSampler1.Controls.Add(this.barUptake);
		this.wizardPageEnterSampler1.Controls.Add(this.label8);
		this.wizardPageEnterSampler1.Description = "低浓度进样，进样时间40s";
		this.wizardPageEnterSampler1.Location = new System.Drawing.Point(0, 0);
		this.wizardPageEnterSampler1.Name = "wizardPageEnterSampler1";
		this.wizardPageEnterSampler1.Size = new System.Drawing.Size(939, 437);
		this.wizardPageEnterSampler1.TabIndex = 15;
		this.wizardPageEnterSampler1.Title = "低浓度溶液进样";
		this.btnContinue.Location = new System.Drawing.Point(409, 243);
		this.btnContinue.Margin = new System.Windows.Forms.Padding(4);
		this.btnContinue.Name = "btnContinue";
		this.btnContinue.Size = new System.Drawing.Size(100, 29);
		this.btnContinue.TabIndex = 9;
		this.btnContinue.Text = "继续";
		this.btnContinue.UseVisualStyleBackColor = true;
		this.btnPause.Location = new System.Drawing.Point(259, 243);
		this.btnPause.Margin = new System.Windows.Forms.Padding(4);
		this.btnPause.Name = "btnPause";
		this.btnPause.Size = new System.Drawing.Size(100, 29);
		this.btnPause.TabIndex = 8;
		this.btnPause.Text = "暂停";
		this.btnPause.UseVisualStyleBackColor = true;
		this.lblUptake.AutoSize = true;
		this.lblUptake.Location = new System.Drawing.Point(365, 205);
		this.lblUptake.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lblUptake.Name = "lblUptake";
		this.lblUptake.Size = new System.Drawing.Size(39, 15);
		this.lblUptake.TabIndex = 7;
		this.lblUptake.Text = "40 s";
		this.barUptake.Location = new System.Drawing.Point(154, 158);
		this.barUptake.Margin = new System.Windows.Forms.Padding(4);
		this.barUptake.Maximum = 40;
		this.barUptake.Name = "barUptake";
		this.barUptake.Size = new System.Drawing.Size(496, 29);
		this.barUptake.Step = 1;
		this.barUptake.TabIndex = 6;
		this.label8.AutoSize = true;
		this.label8.Location = new System.Drawing.Point(114, 113);
		this.label8.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label8.Name = "label8";
		this.label8.Size = new System.Drawing.Size(353, 15);
		this.label8.TabIndex = 5;
		this.label8.Text = "提升溶液，点击 下一步 跳过此步骤，直接开始调谐";
		this.wizardPageLowConPrepare.Controls.Add(this.lblSolution);
		this.wizardPageLowConPrepare.Controls.Add(this.label6);
		this.wizardPageLowConPrepare.Controls.Add(this.label7);
		this.wizardPageLowConPrepare.Description = "选择积分强度为500k<待测元素<1M cps";
		this.wizardPageLowConPrepare.Location = new System.Drawing.Point(0, 0);
		this.wizardPageLowConPrepare.Name = "wizardPageLowConPrepare";
		this.wizardPageLowConPrepare.Size = new System.Drawing.Size(939, 437);
		this.wizardPageLowConPrepare.TabIndex = 13;
		this.wizardPageLowConPrepare.Title = "低浓度测试";
		this.lblSolution.AutoSize = true;
		this.lblSolution.Location = new System.Drawing.Point(78, 201);
		this.lblSolution.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lblSolution.Name = "lblSolution";
		this.lblSolution.Size = new System.Drawing.Size(0, 15);
		this.lblSolution.TabIndex = 5;
		this.label6.AutoSize = true;
		this.label6.Location = new System.Drawing.Point(24, 166);
		this.label6.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label6.Name = "label6";
		this.label6.Size = new System.Drawing.Size(82, 15);
		this.label6.TabIndex = 4;
		this.label6.Text = "溶液要求：";
		this.label7.AutoSize = true;
		this.label7.Location = new System.Drawing.Point(24, 114);
		this.label7.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label7.Name = "label7";
		this.label7.Size = new System.Drawing.Size(308, 15);
		this.label7.TabIndex = 3;
		this.label7.Text = "将进样管放入溶液后，点击 下一步 提升溶液";
		this.wizardPageEnterSampler2.Controls.Add(this.btnContinue1);
		this.wizardPageEnterSampler2.Controls.Add(this.btnPause1);
		this.wizardPageEnterSampler2.Controls.Add(this.lblUptake1);
		this.wizardPageEnterSampler2.Controls.Add(this.barUptake1);
		this.wizardPageEnterSampler2.Controls.Add(this.label13);
		this.wizardPageEnterSampler2.Description = "高浓度进样，进样时间20s";
		this.wizardPageEnterSampler2.Location = new System.Drawing.Point(0, 0);
		this.wizardPageEnterSampler2.Name = "wizardPageEnterSampler2";
		this.wizardPageEnterSampler2.Size = new System.Drawing.Size(939, 437);
		this.wizardPageEnterSampler2.TabIndex = 16;
		this.wizardPageEnterSampler2.Title = "高浓度溶液进样";
		this.btnContinue1.Location = new System.Drawing.Point(409, 243);
		this.btnContinue1.Margin = new System.Windows.Forms.Padding(4);
		this.btnContinue1.Name = "btnContinue1";
		this.btnContinue1.Size = new System.Drawing.Size(100, 29);
		this.btnContinue1.TabIndex = 14;
		this.btnContinue1.Text = "继续";
		this.btnContinue1.UseVisualStyleBackColor = true;
		this.btnContinue1.Click += new System.EventHandler(btnContinue1_Click);
		this.btnPause1.Location = new System.Drawing.Point(259, 243);
		this.btnPause1.Margin = new System.Windows.Forms.Padding(4);
		this.btnPause1.Name = "btnPause1";
		this.btnPause1.Size = new System.Drawing.Size(100, 29);
		this.btnPause1.TabIndex = 13;
		this.btnPause1.Text = "暂停";
		this.btnPause1.UseVisualStyleBackColor = true;
		this.btnPause1.Click += new System.EventHandler(btnPause1_Click);
		this.lblUptake1.AutoSize = true;
		this.lblUptake1.Location = new System.Drawing.Point(365, 205);
		this.lblUptake1.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.lblUptake1.Name = "lblUptake1";
		this.lblUptake1.Size = new System.Drawing.Size(39, 15);
		this.lblUptake1.TabIndex = 12;
		this.lblUptake1.Text = "40 s";
		this.barUptake1.Location = new System.Drawing.Point(154, 158);
		this.barUptake1.Margin = new System.Windows.Forms.Padding(4);
		this.barUptake1.Maximum = 40;
		this.barUptake1.Name = "barUptake1";
		this.barUptake1.Size = new System.Drawing.Size(496, 29);
		this.barUptake1.Step = 1;
		this.barUptake1.TabIndex = 11;
		this.label13.AutoSize = true;
		this.label13.Location = new System.Drawing.Point(114, 113);
		this.label13.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
		this.label13.Name = "label13";
		this.label13.Size = new System.Drawing.Size(353, 15);
		this.label13.TabIndex = 10;
		this.label13.Text = "提升溶液，点击 下一步 跳过此步骤，直接开始调谐";
		this.wizardPageScan2.Controls.Add(this.listBox2);
		this.wizardPageScan2.Controls.Add(this.label14);
		this.wizardPageScan2.Description = "死时间正在校正";
		this.wizardPageScan2.Location = new System.Drawing.Point(0, 0);
		this.wizardPageScan2.Name = "wizardPageScan2";
		this.wizardPageScan2.Size = new System.Drawing.Size(939, 437);
		this.wizardPageScan2.TabIndex = 19;
		this.wizardPageScan2.Title = "开始扫描";
		this.listBox2.FormattingEnabled = true;
		this.listBox2.ItemHeight = 15;
		this.listBox2.Location = new System.Drawing.Point(104, 162);
		this.listBox2.Name = "listBox2";
		this.listBox2.Size = new System.Drawing.Size(699, 244);
		this.listBox2.TabIndex = 2;
		this.label14.AutoSize = true;
		this.label14.Location = new System.Drawing.Point(112, 127);
		this.label14.Name = "label14";
		this.label14.Size = new System.Drawing.Size(0, 15);
		this.label14.TabIndex = 0;
		this.wizardPageResultCal.Controls.Add(this.textBox1);
		this.wizardPageResultCal.Controls.Add(this.label2);
		this.wizardPageResultCal.Controls.Add(this.label1);
		this.wizardPageResultCal.Description = "死时间结果计算";
		this.wizardPageResultCal.Location = new System.Drawing.Point(0, 0);
		this.wizardPageResultCal.Name = "wizardPageResultCal";
		this.wizardPageResultCal.Size = new System.Drawing.Size(939, 437);
		this.wizardPageResultCal.TabIndex = 17;
		this.wizardPageResultCal.Title = "死时间计算";
		this.textBox1.Location = new System.Drawing.Point(117, 124);
		this.textBox1.Name = "textBox1";
		this.textBox1.Size = new System.Drawing.Size(171, 25);
		this.textBox1.TabIndex = 4;
		this.label2.AutoSize = true;
		this.label2.Location = new System.Drawing.Point(294, 127);
		this.label2.Name = "label2";
		this.label2.Size = new System.Drawing.Size(15, 15);
		this.label2.TabIndex = 2;
		this.label2.Text = "s";
		this.label1.AutoSize = true;
		this.label1.Location = new System.Drawing.Point(29, 127);
		this.label1.Name = "label1";
		this.label1.Size = new System.Drawing.Size(67, 15);
		this.label1.TabIndex = 3;
		this.label1.Text = "死时间：";
		this.wizardPageFinish.Description = "完成死时间校正";
		this.wizardPageFinish.Location = new System.Drawing.Point(0, 0);
		this.wizardPageFinish.Name = "wizardPageFinish";
		this.wizardPageFinish.Size = new System.Drawing.Size(939, 437);
		this.wizardPageFinish.Style = CristiPotlog.Controls.WizardPageStyle.Finish;
		this.wizardPageFinish.TabIndex = 20;
		this.wizardPageFinish.Title = "完成！";
		this.wizardPageScan.Controls.Add(this.textBox3);
		this.wizardPageScan.Controls.Add(this.textBox2);
		this.wizardPageScan.Controls.Add(this.label5);
		this.wizardPageScan.Controls.Add(this.label3);
		this.wizardPageScan.Description = "设置积分时间、重复测量次数";
		this.wizardPageScan.Location = new System.Drawing.Point(0, 0);
		this.wizardPageScan.Name = "wizardPageScan";
		this.wizardPageScan.Size = new System.Drawing.Size(939, 437);
		this.wizardPageScan.TabIndex = 12;
		this.wizardPageScan.Title = "设置扫描参数";
		this.textBox3.Location = new System.Drawing.Point(155, 142);
		this.textBox3.Name = "textBox3";
		this.textBox3.Size = new System.Drawing.Size(100, 25);
		this.textBox3.TabIndex = 1;
		this.textBox3.Text = "30";
		this.textBox2.Location = new System.Drawing.Point(155, 107);
		this.textBox2.Name = "textBox2";
		this.textBox2.Size = new System.Drawing.Size(100, 25);
		this.textBox2.TabIndex = 1;
		this.textBox2.Text = "100";
		this.label5.AutoSize = true;
		this.label5.Location = new System.Drawing.Point(67, 145);
		this.label5.Name = "label5";
		this.label5.Size = new System.Drawing.Size(82, 15);
		this.label5.TabIndex = 0;
		this.label5.Text = "重复次数：";
		this.label3.AutoSize = true;
		this.label3.Location = new System.Drawing.Point(21, 111);
		this.label3.Name = "label3";
		this.label3.Size = new System.Drawing.Size(128, 15);
		this.label3.TabIndex = 0;
		this.label3.Text = "积分时间（ms）：";
		this.wizardPageElements.Controls.Add(this.comboRatios);
		this.wizardPageElements.Controls.Add(this.label4);
		this.wizardPageElements.Description = "选择参与死时间校正的同位素";
		this.wizardPageElements.Location = new System.Drawing.Point(0, 0);
		this.wizardPageElements.Name = "wizardPageElements";
		this.wizardPageElements.Size = new System.Drawing.Size(939, 437);
		this.wizardPageElements.TabIndex = 11;
		this.wizardPageElements.Title = "选择同位素";
		this.comboRatios.FormattingEnabled = true;
		this.comboRatios.Location = new System.Drawing.Point(116, 118);
		this.comboRatios.Name = "comboRatios";
		this.comboRatios.Size = new System.Drawing.Size(121, 23);
		this.comboRatios.TabIndex = 1;
		this.comboRatios.SelectedIndexChanged += new System.EventHandler(comboRatios_SelectedIndexChanged);
		this.label4.AutoSize = true;
		this.label4.Location = new System.Drawing.Point(22, 121);
		this.label4.Name = "label4";
		this.label4.Size = new System.Drawing.Size(97, 15);
		this.label4.TabIndex = 0;
		this.label4.Text = "同位素比率：";
		this.wizardPageWelcome.Description = "通过该向导完成死时间校正";
		this.wizardPageWelcome.Location = new System.Drawing.Point(0, 0);
		this.wizardPageWelcome.Name = "wizardPageWelcome";
		this.wizardPageWelcome.Size = new System.Drawing.Size(939, 437);
		this.wizardPageWelcome.Style = CristiPotlog.Controls.WizardPageStyle.Welcome;
		this.wizardPageWelcome.TabIndex = 10;
		this.wizardPageWelcome.Title = "死时间校正";
		base.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
		base.ClientSize = new System.Drawing.Size(939, 485);
		base.Controls.Add(this.wizard1);
		base.Name = "FormInstrumentDeadTime";
		this.Text = "死时间校正";
		base.Load += new System.EventHandler(FormInstrumentDeadTime_Load);
		this.wizard1.ResumeLayout(false);
		this.wizardPageHighConPrepare.ResumeLayout(false);
		this.wizardPageHighConPrepare.PerformLayout();
		this.wizardPageScan1.ResumeLayout(false);
		this.wizardPageScan1.PerformLayout();
		this.wizardPageEnterSampler1.ResumeLayout(false);
		this.wizardPageEnterSampler1.PerformLayout();
		this.wizardPageLowConPrepare.ResumeLayout(false);
		this.wizardPageLowConPrepare.PerformLayout();
		this.wizardPageEnterSampler2.ResumeLayout(false);
		this.wizardPageEnterSampler2.PerformLayout();
		this.wizardPageScan2.ResumeLayout(false);
		this.wizardPageScan2.PerformLayout();
		this.wizardPageResultCal.ResumeLayout(false);
		this.wizardPageResultCal.PerformLayout();
		this.wizardPageScan.ResumeLayout(false);
		this.wizardPageScan.PerformLayout();
		this.wizardPageElements.ResumeLayout(false);
		this.wizardPageElements.PerformLayout();
		base.ResumeLayout(false);
	}
}
